﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using MobileSales.Server.Services;
using System.Net;
using System.ServiceModel.Web;

namespace MobileSales.Server.RestServices
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "ProductServiceREST" in code, svc and config file together.
    public class ProductServiceREST : ProductService, IProductServiceREST
    {
        public Model.Products.Product GetProduct(string productId)
        {
            return base.GetProduct(int.Parse(productId));
        }

        public Model.Products.Category GetCategory(string categoryId)
        {
            return base.GetCategory(int.Parse(categoryId));
        }

        public Model.Products.Tax GetTax(string taxId)
        {
            return base.GetTax(int.Parse(taxId));
        }

        public Model.Products.Unit GetUnit(string unitId)
        {
            return base.GetUnit(int.Parse(unitId));
        }

        public IEnumerable<Model.Products.Category> GetCategoryList()
        {
            return base.GetCategoryList(null);
        }
    }
}
